package com.night.icm.controller.business;

import com.night.icm.common.utils.PageDataDTO;
import com.night.icm.model.business.AcademicProgressDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * AcademicProgressController
 * 查询学生的学业进展
 * 分别统计班级、专业、学院
 *
 * @author Liao ZhiYong
 * @date 2020/2/11
 */
@Api(tags = "学生学业进展")
@RestController
@RequestMapping("/api/icm-academic-progress")
public class AcademicProgressController {


    @ApiOperation(value = "分页查找学业进展")
    @GetMapping(value = "")
    public PageDataDTO<AcademicProgressDTO> findOnePage(
            @ApiParam(value = "页号，从0开始", required = true, defaultValue = "0") @RequestParam("page") @Min(0) int page,
            @ApiParam(value = "每页记录条数", required = true, defaultValue = "30") @RequestParam("size") @Min(1) @Max(100) int size,
            @ApiParam(value = "排序字段，例如：字段1,asc,字段2,desc") @RequestParam(value = "sort", required = false, defaultValue = "id,desc") String sort,
            @ApiParam(value = "所属学院") @RequestParam(value = "academyId", required = false) String academyId,
            @ApiParam(value = "所属专业") @RequestParam(value = "professionId", required = false) String professionId,
            @ApiParam(value = "所属班级") @RequestParam(value = "classId", required = false) String classId,
            @ApiParam(value = "学生姓名") @RequestParam(value = "name", required = false) String name,
            @ApiParam(value = "年级，即入学年份") @RequestParam(value = "grade", required = false) String grade
    ) {
        return null;
    }

    @ApiOperation(value = "根据id查找学业进展")
    @GetMapping(value = "/{id}")
    public AcademicProgressDTO findById(@ApiParam(value = "学业进展id", required = true) @PathVariable(name = "id") String id) {
        return null;
    }
}